package org.poker.prophecy.simulation.action;

import org.apache.log4j.Logger;
import org.poker.prophecy.player.general.Player;
import org.poker.prophecy.simulation.process.RoundProcess;

public class RaiseAction extends AbstractAction{

	private static Logger classLogger = Logger.getLogger(RaiseAction.class);
	
	public RaiseAction(Player player, RoundProcess roundProcess){
		super(roundProcess, player, ActionType.RAISE, roundProcess.getCurrentProcessType());
	}
	
	public void action(){
		int maxAmountOfOnePlayerInThePot = roundProcess.getPot().getMaximumAmountPaidByOnePersonInThisProcess(roundProcess.getCurrentProcessType());
    	//Kann bis jetzt nur verdoppeln
    	int raiseAmount = maxAmountOfOnePlayerInThePot+roundProcess.getBigBlindOfCurrentRound();
    	
    	roundProcess.getTicker().talk(player, "I raise the amount of the BigBlind ("+raiseAmount+").");
		roundProcess.getPot().putMoneyInPot(player, raiseAmount, roundProcess.getCurrentProcessType());
		this.archive();
	}
}
